package org.lili.nestedfunction;

import org.lili.semanticmodel.Edge;
import org.lili.semanticmodel.Graph;

/**
 * @author lili
 * @description ${DESCRIPTION}
 * @create 2018-04-22 下午3:46
 * @since
 **/
public class NestedGraphBuilder {

    public static Graph Graph(Edge... edges) {
        Graph g = new Graph();
        for (Edge e : edges) {
            g.addEdge(e);
            g.addVertice(e.getFromVertex());
            g.addVertice(e.getToVertex());
        }
        return g;
    }
}
